home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: How do I sort a large Array?
- Date: 22 Feb 1996 10:58:15 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4giec7INN1sc@keats.ugrad.cs.ubc.ca>
- References: <4g1kr1$kg1@rznews.rrze.uni-erlangen.de>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4g1kr1$kg1@rznews.rrze.uni-erlangen.de>,
- Matthias Gessl (CIP 95) <msgessl@cip.informatik.uni-erlangen.de> wrote:
- >How do I sort a large array of char-arrays, which is too large to fit in
- >memory?
- >For example I want to sort an array of >10000 elements, but have only RAM
- >for about 500 elements
- >
- >Many thanks in advance.
-
- You sort from one file to another. Create N sorted segments (files) that are as
- large as possible, using available memory. Then merge them together.
-
- A good textbook on filesystems and database management should outline
- techniques for sorting large files using a polyphase merge.
- --
-
-